﻿{template admin_improt}
<script type="text/javascript">
$(document).ready(function(){
	$("#startTime").datepicker($.datepicker.regional['zh-CN']);
});
$(document).ready(function(){
	$("#endTime").datepicker($.datepicker.regional['zh-CN']);
});
function checkAllpartner(form, name) {
	for(var i = 0; i < form.elements.length; i++) {
		var e = form.elements[i];
		if(e.name.match(name)) {
			e.checked = form.elements['chkall'].checked;
		}
	}
}
</script>
<script type="text/javascript">
function ProductsSubmit(type){
	//type;1为推荐;2为取消推荐;3为批量删除
	if(type == 1){
		document.getElementById("p_form").action = "?p=hiring&a=Recommend&recommend=1";
		//alert(123);
		document.getElementById("p_form").submit();
        return true;
	} else if(type == 2) {
		document.getElementById("p_form").action = "?p=hiring&a=Recommend&recommend=2";
		document.getElementById("p_form").submit();
		return true;
	} if(type == 3) {
		if(confirm("确认删除所有选中数据么？操作不可恢复")){
			document.getElementById("p_form").action = "?p=user&a=delall";
			document.getElementById("p_form").submit();
			return true;
		} else {
			return false;
		}
	} else {
		return false;
	}
}

function delProducts(mid){
	if(confirm("确认执行此操作么？操作不可恢复")){
		window.location="admin.php?p=admin_user&a=del&a_id="+mid;
	}
}
</script>
<div class="mainStyle">
	<div class="mainTitle">
		<span class="mainTitle_text">
			后台管理员列表
		</span>
		<span class="mainTitle_text">
			<a href='admin.php?p=admin_user&a=add'>添加管理员</a>
		</span>
	</div>
	<div class="mainSearch">
		<form action="admin.php?p=user" method="post">
			<div class="mainTitle_btn">
			<span style="font-size:12px;">搜索方式：</span>
				<span>
					<select name="class">
						<option value="" selected>▼请选择搜索方式</option>
							<option value="1"  {if $class == "1"}selected{/if}>用户名</option>
							<option value="2"  {if $class == "2"}selected{/if}>手机号码</option>
							<option value="3"  {if $class == "3"}selected{/if}>工作所在地址</option>
					</select>
					<select name="type">
						<option value="" selected>▼请选择搜索方式</option>
							<option value="1"  {if $type == "1"}selected{/if}>验证通过</option>
							<option value="2"  {if $type == "2"}selected{/if}>验证未通过</option>
					</select>
				</span>
			</div>
			<div class="mainSearch_text">
				<span><input type="text" name="title" style="width:200px;height:16px;padding:3px;border:1px solid #bbbbbb;" value="$_REQUEST['title']"/></span>
				<span><input type="submit" value="搜索" /></span>
			</div>
		</form>
		<span class="mainTitle_text6"style="margin-top:5px;margin-left:30px;">管理员人数：{$numbers}</span>
	
	</div>
	<div class="mainTitle_list">
		<span class="mainTitle_text1">管理员账号</span>
		<span class="mainTitle_text3">添加时间</span>
		<span class="mainTitle_text6">操作</span>
	</div>
	<form id="p_form" name="p_form" action="" method="post">
		<!--{if $list}-->
			<!--{loop $list $list_admin}-->
				<div class="mainList">
					<span class="mainList_text1">{$list_admin['username']}</span>
					<span class="mainList_text3">{$list_admin['regdate']}</span>
					<span class="mainList_text6">
						<a href='javascript:delProducts({$list_admin[uid]}) '>删除</a>
					</span>
				</div>
			<!--{/loop}-->
			
			<div style="padding-top:10px;width:100%;">
				<div style="padding-left:30px;font-size:12px;">
					<div style="float:left;display:inline;margin-top:2px;"><input type="checkbox" id="chkall" name="chkall" onclick="checkAllpartner(this.form,'ids')"></div>
					<div style="float:left;display:inline;margin-top:6px;">全选</div>
					<div style="float:left;display:inline;margin-left:5px;">
	
						<input type="submit" value="批量删除" onclick="return ProductsSubmit('3');"/>
					</div>
				</div>
				<div style="text-align:right;padding-right:30px;"><!--{if $pagecount}--><!--{loop $pagecount $pageLinkText}--><span style="border:1px solid #cccccc;padding:0px 4px;margin:5px;font-size:12px;">{$pageLinkText}</span><!--{/loop}--><!--{/if}--></div>
			</div>
		<!--{else}-->
		 	<div style="width:100%;text-align:center;font-size:12px;padding:40px 0px;">暂无内容!</div>
		 <!--{/if}-->
	 </form>
</div>
{template admin_bottom}